#pragma once
#include <string>
#include <list>
#include "JSerialize.h"

class JBaseFile : public JSerialize
{
public:
	JBaseFile(void);
	~JBaseFile(void);
	//Serialize begin.
	std::string filename;
	std::string createTime;
	std::string verifyTime;
	//Serialize end.
	JBaseFile(std::string _fileName,std::string _createTime,std::string _verifyTime);
	JBaseFile(std::string _fileName);
	static bool HasChildBaseFile(std::string parentPath,std::string baseFileName);
	static bool HasGenerateFile(std::string ancestor,std::string _fileName);
	static bool IsExist(std::string _path);
	static bool CopyBaseFile(std::string oldFileName,std::string newFileName);
	static void ReName(std::string oldFileName,std::string newFileName);
	static std::list<std::string> RecurseDownBaseFile(std::string _rootPath);
	static std::string Absolute(std::string fileName);
	int Serialize(std::iostream& _strea,int& allSize);
	void Reserialize(std::iostream& _strea);
};

